﻿using System;
using NUnit.Framework;
using BM.Core.Data;
using BM.Data.NHB;
using BM.Core.Model;
using NHibernate;
using NHibernate.Cfg;
namespace BM.Data.NHB.Test
{
    [TestFixture]
    public class NHBRepositoryTest
    {
        [Test]
        public void Insert()
        {
            ISessionFactory sf = (new Configuration()).Configure().BuildSessionFactory();
            ISession session = sf.OpenSession();
            IRepository<User> rep = new NHBRepository<User>(session);
            User user = new User();
            user.Id = Guid.NewGuid().ToString();
            user.Pwd = "123123";
            user.CreateTime = DateTime.Now;
            user.UpdateTime = DateTime.Now;
           

            rep.Insert(user);
        }
    }
}
